<template>
	<view style="padding-top: 20rpx;">
		<view class="fav" v-for="fav in favList" :key="fav.id">
			<view class="d-flex d-flex-between d-flex-middle">
				<view class="d-flex d-flex-middle">
					<image src="https://yuexiaoda-1314351529.cos.ap-shanghai.myqcloud.com/appUpload/20241223141109-ac38c1fa-47fb-46f8-83fc-1f37a1474265.png" style="width: 60rpx;height: 60rpx;border-radius: 60rpx;margin-right: 15rpx;"></image>
					<view>张三丰</view>
				</view>
				<view style="font-size: 24rpx;color: aquamarine;">取消</view>
			</view>
		</view>
		<!-- <view class="list_box" @click="bindTo('/my/feedback/feedback')">
			<view class="box_left">意见反馈</view>
			<image src="https://yuexiaoda-1314351529.cos.ap-shanghai.myqcloud.com/huoyunsf/my/icon_go.png" style="width: 11rpx;height: 20rpx;"></image>
		</view>
		<view class="list_box" @click="bindTo('/my/setting/mimi')">
			<view class="box_left">隐私政策</view>
			<image src="https://yuexiaoda-1314351529.cos.ap-shanghai.myqcloud.com/huoyunsf/my/icon_go.png" style="width: 11rpx;height: 20rpx;"></image>
		</view>
		<view class="list_box" @click="bindTo('/my/setting/xieyi')">
			<view class="box_left">用户协议</view>
			<image src="https://yuexiaoda-1314351529.cos.ap-shanghai.myqcloud.com/huoyunsf/my/icon_go.png" style="width: 11rpx;height: 20rpx;"></image>
		</view>
		<view class="list_box" @click="bindTo('/my/setting/logOff')">
			<view class="box_left">用户注销</view>
			<u-icon name="arrow-right"></u-icon>
		</view>

		<view class="login_btn" @click="bindOut()">退出登录</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				favList:[
					{
						id:'1',
						avatar:'https://yuexiaoda-1314351529.cos.ap-shanghai.myqcloud.com/appUpload/20241223141109-ac38c1fa-47fb-46f8-83fc-1f37a1474265.png',
						name:'张三丰',
						dateTime:'2025-09-10 15:33'
					},{
						id:'2',
						avatar:'https://yuexiaoda-1314351529.cos.ap-shanghai.myqcloud.com/appUpload/20241223141109-ac38c1fa-47fb-46f8-83fc-1f37a1474265.png',
						name:'张三丰',
						dateTime:'2025-09-10 15:33'
					}
				]
			}
		},
		methods: {
			bindTo(name) {
				let token = this.$queue.getData("token");
				if (token) {
					uni.navigateTo({
						url: name
					})
				}

			},
			bindOut() {
				uni.showModal({
					title: '退出登录',
					content: '是否退出登录',
					success: function(res) {
						if (res.confirm) {
							uni.clearStorage();
							uni.removeStorageSync("image_url")
							uni.removeStorageSync("userId")
							uni.removeStorageSync("status")
							uni.removeStorageSync("nickName")
							uni.removeStorageSync("token")
							uni.removeStorageSync("mobile")
							
							uni.navigateBack()
						} else if (res.cancel) {
							console.log('用户点击取消');
							uni.showToast({
								title: '取消退出登录',
								icon: 'none'
							})
						}
					}
				});
			}
		}
	}
</script>

<style>
	page {
		background: #f5f5f5;
	}

	.list_box {
		display: flex;
		align-items: center;
		height: 110rpx;
		margin: 0 30rpx;
	}

	.box_left {
		flex: 1;
		display: flex;
		justify-content: left;
		align-items: center;
	}


	.use_image image {
		width: 60rpx;
		height: 60rpx;
	}

	.login_btn {
		width: 90%;
		margin: 0 auto;
		text-align: center;
		background: #02B595;
		height: 80rpx;
		border-radius: 16rpx;
		color: #ffffff;
		line-height: 80rpx;
		margin-top: 60rpx;
	}
	.fav{
		background-color: #ffffff;
		padding:20rpx 30rpx;
		border-bottom: solid 1px #eeeeee
	}
</style>